home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1996-01-17 | 3.0 KB | 85 lines |
- ' ************************************* Commands used:
- ' * * Imploder Load Blitter Clear
- ' * Amcaf Examples * Pt Cia Speed Turbo Draw
- ' * More Protracker Commands V1.0 * Pt Play Blitter Fill
- ' * Written by Chris Hodges * =Pt Cnote
- ' * * =Pt Cinstr
- ' ************************************* =Pt Vu
- '
- ' Hide the mouse cursor, because we need sprite 0.
- Hide
- ' Load some music first. Hawkeye is a tune by Smt/Haujobb (Sascha Theel).
- ' The original tune comes from the Manics of Noise on the C64.
- ' This is one of my favourite chip tunes. ;-)
- ' Musics have to be loaded into chipmem, so the banknumber is negativ.
- ' The music file has been file imploded to save a mere 40 KB of valuable
- ' disk space.
- Extension_8_0EA2 "Data/mod.hawkeye",-3
- '�Open an eight colours screen. I used a two colours one in the past,
- ' but it wasn't that nice to follow the dots then...
- Screen Open 0,320,256,8,Lowres
- Curs Off : Flash Off : Paper 0 : Pen 1 : Cls
- ' Define some colors.
- Palette $8,$FFF,$C00,$CC0,$C0,$C0C
- ' Draw the box before switching to double buffer mode.
- Ink 1 : Box 31,167 To 288,249
- ' Use double buffering for a flicker free display.
- Double Buffer
- Autoback 0
- ' Create a nice copper bar.
- Set Rainbow 0,1,40,"","",""
- For A=0 To 39
- Rain(0,A)=Max(Min(A-15,15),0)*$100+Min(A,15)*$10+Max(Min(A/2-8,15),0)
- Next
- Rainbow 0,0,Y Hard(-1),162
- ' Dim a field to hold the current frequence-o-meter state.
- Dim FR(31,3)
- ' Start the music.
- Extension_8_10F2 0
- Extension_8_10C6 64
- Extension_8_10D6 15
- Extension_8_108E 3
- ' Main loop
- Repeat
- ' Clear the old frequence-o-meters.
- Extension_8_1234 0,0,32,0 To 288,160
- ' This little routine gets the frequency of a channel
- ' and therefore creates the height of the bars.
- For A=0 To 3
- If Extension_8_15FE(A)
- F=Min(Max(( Extension_8_160E(A)-5000)/800,0),31)
- FR(F,A)=Min(FR(F,A)+16,32)
- If F>0 : FR(F-1,A)=Min(FR(F-1,A)+4,32) : End If
- If F<31 : FR(F+1,A)=Min(FR(F+1,A)+4,32) : End If
- End If
- Next
- ' Now draw all four frequence-o-meters
- For A=0 To 3
- For F=0 To 31
- H=FR(F,A)
- If H
- Extension_8_1030 F*8+35,32-H+A*40 To F*8+32,32+A*40,1,-1
- Extension_8_1030 F*8+36,32-H+A*40 To F*8+39,32+A*40,1,-1
- End If
- FR(F,A)=Max(H-2,0)
- Next
- ' This dot draws the bottom line ;-)
- Extension_8_0388 287,34+A*40,1
- Next
- ' Now fill the bars
- Extension_8_1066 0,0,32,0,288,160
- ' Scroll the note field and wait for the operation to finish.
- Screen Copy Physic(0),33,168,288,249 To Logic(0),32,168
- Extension_8_1258
- ' Now draw the dots if the channel has been triggered.
- For A=0 To 3
- If Extension_8_15FE(A) Then Extension_8_0388 286,248-Min(Max(( Extension_8_160E(A)-3000)/400,0),75),Max(2+A- Extension_8_10E6(A)*4,1)
- Next
- ' Swap the screens and sync with the beam
- Screen Swap
- Wait Vbl
- Until I$=Chr$(27) or Mouse Key
- Extension_8_10A8
- Screen Close 0
- Rainbow Del : View : Wait Vbl
- End